import {Injectable} from "@angular/core";
import {CanActivate} from "@angular/router";
import {LoginService} from "./login/login.service";

@Injectable({
  providedIn: 'root'
})
export class RouteGuard implements CanActivate {

  constructor(private loginService: LoginService) {}

  canActivate(): boolean {
    this.loginService.getLoginUser()
      .subscribe()
    return true;
  }
}
